package com.zaizai.service.impl;

import java.util.List;

import com.zaizai.domain.CommodityPrice;
import com.zaizai.mapper.CommodityPriceMapper;
import com.zaizai.service.ICommodityPriceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 商品日期单价Service业务层处理
 */
@Service
public class CommodityPriceServiceImpl implements ICommodityPriceService
{
    @Autowired
    private CommodityPriceMapper commodityPriceMapper;

    /**
     * 查询商品日期单价
     * 
     * @param id 商品日期单价主键
     * @return 商品日期单价
     */
    public CommodityPrice selectCommodityPriceById(Long id)
    {
        return commodityPriceMapper.selectCommodityPriceById(id);
    }

    /**
     * 查询商品日期单价列表
     * 
     * @param commodityPrice 商品日期单价
     * @return 商品日期单价
     */
    public List<CommodityPrice> selectCommodityPriceList(CommodityPrice commodityPrice)
    {
        return commodityPriceMapper.selectCommodityPriceList(commodityPrice);
    }

    /**
     * 新增商品日期单价
     * 
     * @param commodityPrice 商品日期单价
     * @return 结果
     */
    public int insertCommodityPrice(CommodityPrice commodityPrice)
    {
        return commodityPriceMapper.insertCommodityPrice(commodityPrice);
    }

    /**
     * 修改商品日期单价
     * 
     * @param commodityPrice 商品日期单价
     * @return 结果
     */

    public int updateCommodityPrice(CommodityPrice commodityPrice)
    {
        return commodityPriceMapper.updateCommodityPrice(commodityPrice);
    }

    /**
     * 批量删除商品日期单价
     * 
     * @param ids 需要删除的商品日期单价主键
     * @return 结果
     */

    public int deleteCommodityPriceByIds(Long[] ids)
    {
        return commodityPriceMapper.deleteCommodityPriceByIds(ids);
    }

    /**
     * 删除商品日期单价信息
     * 
     * @param id 商品日期单价主键
     * @return 结果
     */

    public int deleteCommodityPriceById(Long id)
    {
        return commodityPriceMapper.deleteCommodityPriceById(id);
    }
}
